Integrand size = 12, antiderivative size = 43 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\frac {2 \arctan \left (\frac {b+3 \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {9-b^2}}\right )}{\sqrt {9-b^2} f} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.09, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2739, 632, 210} \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\frac {2 \arctan \left (\frac {a \tan \left (\frac {1}{2} (e+f x)\right )+b}{\sqrt {a^2-b^2}}\right )}{f \sqrt {a^2-b^2}} \]
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{f} \\ & = -\frac {4 \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (e+f x)\right )\right )}{f} \\ & = \frac {2 \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f} \\ \end{align*}
Time = 0.03 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\frac {2 \arctan \left (\frac {b+3 \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {9-b^2}}\right )}{\sqrt {9-b^2} f} \]
[In]
[Out]
Time = 0.80 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {2 \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{f \sqrt {a^{2}-b^{2}}}\) | \(47\) |
default | \(\frac {2 \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{f \sqrt {a^{2}-b^{2}}}\) | \(47\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, f}\) | \(133\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 190, normalized size of antiderivative = 4.42 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\left [-\frac {\sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, a b \sin \left (f x + e\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (f x + e\right ) \sin \left (f x + e\right ) + b \cos \left (f x + e\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (f x + e\right )^{2} - 2 \, a b \sin \left (f x + e\right ) - a^{2} - b^{2}}\right )}{2 \, {\left (a^{2} - b^{2}\right )} f}, -\frac {\arctan \left (-\frac {a \sin \left (f x + e\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (f x + e\right )}\right )}{\sqrt {a^{2} - b^{2}} f}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (37) = 74\).
Time = 2.17 (sec) , antiderivative size = 144, normalized size of antiderivative = 3.35 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\begin {cases} \frac {\tilde {\infty } x}{\sin {\left (e \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge f = 0 \\\frac {\log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} \right )}}{b f} & \text {for}\: a = 0 \\\frac {x}{a + b \sin {\left (e \right )}} & \text {for}\: f = 0 \\\frac {2}{b f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - b f} & \text {for}\: a = - b \\- \frac {2}{b f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + b f} & \text {for}\: a = b \\\frac {\log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + \frac {b}{a} - \frac {\sqrt {- a^{2} + b^{2}}}{a} \right )}}{f \sqrt {- a^{2} + b^{2}}} - \frac {\log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + \frac {b}{a} + \frac {\sqrt {- a^{2} + b^{2}}}{a} \right )}}{f \sqrt {- a^{2} + b^{2}}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.40 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\frac {2 \, {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} f} \]
[In]
[Out]
Time = 8.26 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.98 \[ \int \frac {1}{3+b \sin (e+f x)} \, dx=\frac {2\,\mathrm {atan}\left (\frac {b+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{f\,\sqrt {a^2-b^2}} \]
[In]
[Out]